#ifndef SCENEGRAPH_H
#define SCENEGRAPH_H

#include <vector>

enum NodeType
{
    TRANS_ROTATION,
    TRANS_TRANSLATION,
    TRANS_SCALE,
    ELEM_MESH,
    ELEM_LIGHT,
    ELEM_CAMERA
};

class Node
{
private:
    Node * father;
    std::vector<Node*> sons;
public:
    Node();
    Node(Node const & f);

    inline void addSon(Node & s){this->sons.push_back(&s);}
    inline Node * getFather(){return this->father;}
    inline Node * getSon(int i){return this->sons[i];}

    virtual NodeType getType() = 0;
};
class SceneGraph
{
private:
    Node * root;
public:
    SceneGraph();
};
class Transformation : public Node
{
private:
public:
    virtual NodeType getType() = 0;
};
class Rotation : public Transformation
{
public:
    inline NodeType getType(){return TRANS_ROTATION;}
};
class Translation : public Transformation
{
public:
    inline NodeType getType(){return TRANS_TRANSLATION;}
};
class Scale : public Transformation
{
public:
    inline NodeType getType(){return TRANS_SCALE;}
};

class SceneElement : public Node
{
private:
public:
    virtual NodeType getType() = 0;
};
class Mesh : public SceneElement
{
public:
    inline NodeType getType(){return ELEM_MESH;}
};
/*class Light : public SceneElement
{
public:
    inline NodeType getType(){return ELEM_LIGHT;}
};*/
/*class Camera : public SceneElement
{
public:
    inline NodeType getType(){return ELEM_CAMERA;}
};*/

#endif // SCENEGRAPH_H
